<script setup lang="ts">
/**
 * @name RealtimeIndicatorData
 * @description 实时指标数据
 */

/**
 * 实时指标数据页面
 * 查询某个点位下所有指标的【表头】数据
 * 无论指标类别是“用量”还是“电压”、“温度”等
 * 页面定时刷新
 */
import ViewTree from './components/ViewTree.vue'
import ViewManage from './components/ViewManage.vue'

const treeRef = ref<InstanceType<typeof ViewTree>>()

function onPauseTimer() {
  treeRef.value?.pause()
}
function onPlayTimer() {
  treeRef.value?.play()
}
</script>

<template>
  <div
    class="padding-sm relative flex gap-sm container"
  >
    <ViewTree ref="treeRef" />
    <ViewManage @pause-timer="onPauseTimer" @play-timer="onPlayTimer" />
  </div>
</template>
